\(\int \frac {(d+e x) (a+b \log (c x^n))}{x^4} \, dx\) [8]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 57 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {b d n}{9 x^3}-\frac {b e n}{4 x^2}-\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )}{2 x^2} \]

[Out]

-1/9*b*d*n/x^3-1/4*b*e*n/x^2-1/3*d*(a+b*ln(c*x^n))/x^3-1/2*e*(a+b*ln(c*x^n))/x^2

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {45, 2372, 12} \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {b d n}{9 x^3}-\frac {b e n}{4 x^2} \]

[In]

Int[((d + e*x)*(a + b*Log[c*x^n]))/x^4,x]

[Out]

-1/9*(b*d*n)/x^3 - (b*e*n)/(4*x^2) - (d*(a + b*Log[c*x^n]))/(3*x^3) - (e*(a + b*Log[c*x^n]))/(2*x^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = -\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-(b n) \int \frac {-2 d-3 e x}{6 x^4} \, dx \\ & = -\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {1}{6} (b n) \int \frac {-2 d-3 e x}{x^4} \, dx \\ & = -\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {1}{6} (b n) \int \left (-\frac {2 d}{x^4}-\frac {3 e}{x^3}\right ) \, dx \\ & = -\frac {b d n}{9 x^3}-\frac {b e n}{4 x^2}-\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )}{2 x^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.82 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {6 a (2 d+3 e x)+b n (4 d+9 e x)+6 b (2 d+3 e x) \log \left (c x^n\right )}{36 x^3} \]

[In]

Integrate[((d + e*x)*(a + b*Log[c*x^n]))/x^4,x]

[Out]

-1/36*(6*a*(2*d + 3*e*x) + b*n*(4*d + 9*e*x) + 6*b*(2*d + 3*e*x)*Log[c*x^n])/x^3

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.84

method result size
parallelrisch \(-\frac {18 b e x \ln \left (c \,x^{n}\right )+9 b e n x +18 a e x +12 b \ln \left (c \,x^{n}\right ) d +4 b d n +12 a d}{36 x^{3}}\) \(48\)
risch \(-\frac {b \left (3 e x +2 d \right ) \ln \left (x^{n}\right )}{6 x^{3}}-\frac {-9 i \pi b e x \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+9 i \pi b e x \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+9 i \pi b e x \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-9 i \pi b e x \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+18 \ln \left (c \right ) b e x +9 b e n x +18 a e x -6 i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+6 i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+6 i \pi b d \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-6 i \pi b d \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+12 d b \ln \left (c \right )+4 b d n +12 a d}{36 x^{3}}\) \(235\)

[In]

int((e*x+d)*(a+b*ln(c*x^n))/x^4,x,method=_RETURNVERBOSE)

[Out]

-1/36/x^3*(18*b*e*x*ln(c*x^n)+9*b*e*n*x+18*a*e*x+12*b*ln(c*x^n)*d+4*b*d*n+12*a*d)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {4 \, b d n + 12 \, a d + 9 \, {\left (b e n + 2 \, a e\right )} x + 6 \, {\left (3 \, b e x + 2 \, b d\right )} \log \left (c\right ) + 6 \, {\left (3 \, b e n x + 2 \, b d n\right )} \log \left (x\right )}{36 \, x^{3}} \]

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x^4,x, algorithm="fricas")

[Out]

-1/36*(4*b*d*n + 12*a*d + 9*(b*e*n + 2*a*e)*x + 6*(3*b*e*x + 2*b*d)*log(c) + 6*(3*b*e*n*x + 2*b*d*n)*log(x))/x
^3

Sympy [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.19 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=- \frac {a d}{3 x^{3}} - \frac {a e}{2 x^{2}} - \frac {b d n}{9 x^{3}} - \frac {b d \log {\left (c x^{n} \right )}}{3 x^{3}} - \frac {b e n}{4 x^{2}} - \frac {b e \log {\left (c x^{n} \right )}}{2 x^{2}} \]

[In]

integrate((e*x+d)*(a+b*ln(c*x**n))/x**4,x)

[Out]

-a*d/(3*x**3) - a*e/(2*x**2) - b*d*n/(9*x**3) - b*d*log(c*x**n)/(3*x**3) - b*e*n/(4*x**2) - b*e*log(c*x**n)/(2
*x**2)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {b e n}{4 \, x^{2}} - \frac {b e \log \left (c x^{n}\right )}{2 \, x^{2}} - \frac {b d n}{9 \, x^{3}} - \frac {a e}{2 \, x^{2}} - \frac {b d \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac {a d}{3 \, x^{3}} \]

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x^4,x, algorithm="maxima")

[Out]

-1/4*b*e*n/x^2 - 1/2*b*e*log(c*x^n)/x^2 - 1/9*b*d*n/x^3 - 1/2*a*e/x^2 - 1/3*b*d*log(c*x^n)/x^3 - 1/3*a*d/x^3

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.04 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {{\left (3 \, b e n x + 2 \, b d n\right )} \log \left (x\right )}{6 \, x^{3}} - \frac {9 \, b e n x + 18 \, b e x \log \left (c\right ) + 4 \, b d n + 18 \, a e x + 12 \, b d \log \left (c\right ) + 12 \, a d}{36 \, x^{3}} \]

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x^4,x, algorithm="giac")

[Out]

-1/6*(3*b*e*n*x + 2*b*d*n)*log(x)/x^3 - 1/36*(9*b*e*n*x + 18*b*e*x*log(c) + 4*b*d*n + 18*a*e*x + 12*b*d*log(c)
 + 12*a*d)/x^3

Mupad [B] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.86 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {2\,a\,d+x\,\left (3\,a\,e+\frac {3\,b\,e\,n}{2}\right )+\frac {2\,b\,d\,n}{3}}{6\,x^3}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d}{3}+\frac {b\,e\,x}{2}\right )}{x^3} \]

[In]

int(((a + b*log(c*x^n))*(d + e*x))/x^4,x)

[Out]

- (2*a*d + x*(3*a*e + (3*b*e*n)/2) + (2*b*d*n)/3)/(6*x^3) - (log(c*x^n)*((b*d)/3 + (b*e*x)/2))/x^3